package com.yc.hotel.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.yc.hotel.entity.RoomType;
import com.yc.hotel.enums.ResultEnum;
import com.yc.hotel.service.IRoomTypeService;
import com.yc.hotel.vo.ResultVO;

@RestController
@RequestMapping("/type")
public class RoomTypeController {

	@Autowired
	private IRoomTypeService roomTypeServiceImpl;

	@PostMapping("/finds")
	private ResultVO finds(@RequestParam Map<String, Object> map) {
		List<RoomType> list = roomTypeServiceImpl.finds(map);
		System.out.println("finds: " + list);
		return new ResultVO(ResultEnum.SUCCESS, list);
	};
}
